package com.lining.orangeservice.service;

import com.lining.orangeservice.common.enums.PaymentMethod;
import com.lining.orangeservice.entity.abstractentity.Order;
import com.lining.orangeservice.entity.dto.request.OrderCreateRequest;
import com.lining.orangeservice.entity.dto.OrderQuery;
import com.lining.orangeservice.entity.dto.OrderStatistics;

import java.time.LocalDate;
import java.util.List;

// 订单服务接口
public interface OrderService {
    Order createOrder(OrderCreateRequest request);
    Order getOrder(Long orderId);
    boolean cancelOrder(Long orderId);
    boolean payOrder(Long orderId, PaymentMethod method);
    List<Order> getUserOrders(Long userId, OrderQuery query);
    OrderStatistics getOrderStatistics(LocalDate startDate, LocalDate endDate);
}